<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const date = new Date(1614395861 * 1000)
      // undefined
      date.getFullYear()
      // 2021
      date.toLocaleDateString()
      // "2021/2/27"
      date.toLocaleString()
      // "2021/2/27 上午11:17:41"
      const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }
      date.toLocaleString(undefined, options)
      // "2021年2月27日星期六"
    </script>
  </body>
</html>
